/**
 * 
 * created by Huang Yuan
 * need jquery lib
 * 
 * **/





/* 
 * get request parameter in href.location 
 */ 
function request(paras) { 
    var url = location.href; 
    var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&"); 
    var paraObj = {}; 
    for ( var i = 0; j = paraString[i]; i++) { 
        paraObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=") + 1, j.length); 
    } 
    var returnValue = paraObj[paras.toLowerCase()]; 
    if (typeof (returnValue) == "undefined") { 
        return ""; 
    } else { 
        var data = returnValue.split("#"); 
        return data[0]; 
    } 
} 
//make plugin works 
(function($) { 
    $.fn.extend({ 
        request : request 
    }); 
    $.request = request; 
})(jQuery); 